package cn.iocoder.yudao.module.bpm.enums.projectinfo;

import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 流程实例 ProcessInstance 的状态
 *
 * @author 芋道源码
 */
@Getter
@AllArgsConstructor
public enum BpmProjectInfoStatusEnum implements IntArrayValuable {

    NOT_STARTED(1, "未开始"),
    RUNNING(2, "进行中"),
    FINISHED(3, "已完成"),
    OVERDUE(4, "已逾期"),
    ;

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmProjectInfoStatusEnum::getStatus).toArray();

    /**
     * 状态
     */
    private final Integer status;
    /**
     * 描述
     */
    private final String desc;

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
